home *** CD-ROM | disk | FTP | other *** search
- #include <GestaltEqu.h>
- #include "ComponentData.h"
- #include "MyRegisterComponent.h"
-
- pascal ComponentResult MyRegisterComponent(PrivateGlobals **storage)
- {
- ComponentResult result=-1;
-
- result = (ComponentResult) SetDefaultComponent( (Component) (*storage)->self,
- defaultComponentIdentical +
- defaultComponentAnyFlags );
-
- result = CreateComponentGlobals(storage, 0);
-
- return result;
- }
-
- ComponentResult CreateComponentGlobals(PrivateGlobals **storage, Component delegateComponent)
- {
- SharedGlobals *mySharedGlobalsPtr;
-
- mySharedGlobalsPtr = (SharedGlobals *) NewPtrSysClear( sizeof(SharedGlobals) );
- if (mySharedGlobalsPtr)
- {
- mySharedGlobalsPtr->delegateComponent = delegateComponent;
- SetComponentRefcon((Component)(*storage)->self,(long) mySharedGlobalsPtr);
- }
- else
- return -1;
-
- return noErr;
- }
-
-
-
-
-
-